package com.lcn.service;

import com.lcn.pojo.netty.ChatMsg;
import com.lcn.utils.PagedGridResult;

public interface ChatMessageService {

    /**
     * 将消息保存到数据库
     *
     * @param chatMsg
     */
    void saveChatMessage(ChatMsg chatMsg);

    /**
     * 分页查询历史聊天记录
     *
     * @param senderId
     * @param receiverId
     * @param page
     * @param pageSize
     * @return
     */
    PagedGridResult list(String senderId, String receiverId, Integer page, Integer pageSize);

}
